﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using CashFlow.Db.Entity;
using CashFlow.Db.DAL;

namespace CashFlow.Web.Areas.ShopManage.Service.Implement
{
    public class ShopPerformanceService
        : MyService<ShopPerformanceEntity>, IShopPerformanceService
    {
        public IList<ShopPerformanceEntity> QueryByShopManagerUserId(
            int shopMnaagerUserId)
        {
            using (var db = SqlSugarHelper.GetDb())
            {
                var ls = db.Queryable<ShopPerformanceEntity>()
                           .Where(x => x.ShopManagerUserId == shopMnaagerUserId)
                           .OrderByDescending(x => x.Date)
                           .ToList();
                return ls;
            }
        }
    }
}